<extend name="Base/common"/>
<block name="body">
    <link href="__PUBLIC__/Home/css/about.css" rel="stylesheet">
    <div class="span3"></div>
    <div class="span6">
        <div class="control-group">
            <label class="control-label" style="padding-top: 30px;">意见反馈</label>
            <textarea name="advice" id="advice" rows="8" class="input-xxlarge"></textarea>
        </div>
        <div class="control-group">
            <div class="controls">
                <button type="submit" class="btn btn-info" id="advice_btn" style="margin-left: 18px;">提交建议</button>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $(function () {
            $('#advice_btn').click(function (event) {
                var advice = $('#advice').val();
                if (advice == "") {
                    alert("请填写您的建议！");
                    $("#advice").focus();
                    return false;
                }
                $.ajax({
                    type: "post",
                    url: "{:U('tousu_add')}",
                    data: {advice: advice},
                    async: false,
                    contentType: "application/x-www-form-urlencoded; charset=utf-8",
                    success: function(data) {
                        alert(data.info);
                        window.location.href="{:U('/Home/index')}";
                    }
                });
            });
        });
    </script>

</block>